//
//  NavigationController.m
//  News
//
//  Created by 徐涵菲 on 2018/4/24.
//  Copyright © 2018年 Wangly. All rights reserved.
//

#import "NavigationController.h"

@interface NavigationController ()

@end

@implementation NavigationController

// 当类第一次被加载的时调用
+ (void)initialize
{
    // 取出导航条item的外观对象(主题对象)
    UIBarButtonItem *item = [UIBarButtonItem appearance];
    
    // 设置默认状态文字的颜色
    NSMutableDictionary *md = [NSMutableDictionary dictionary];
    md[NSForegroundColorAttributeName] = [UIColor orangeColor];
    [item setTitleTextAttributes:md forState:UIControlStateNormal];
    
    // 设置高亮状态文字的颜色
    NSMutableDictionary *higMd = [NSMutableDictionary dictionary];
    higMd[NSForegroundColorAttributeName] = [UIColor greenColor];
    [item setTitleTextAttributes:higMd forState:UIControlStateHighlighted];
    
    // 设置不可用状态的颜色
    NSMutableDictionary *disMd = [NSMutableDictionary dictionary];
    disMd[NSForegroundColorAttributeName] = [UIColor grayColor];
    [item setTitleTextAttributes:disMd forState:UIControlStateDisabled];

}

@end
